package com.hp.monitoring.pingmon;

import java.io.IOException;
import java.net.InetAddress;

public class HostImpl implements Host {

	private InetAddress address;
	
	public InetAddress getAddress() {
		return address;
	}

	public boolean isActive() {
		boolean result = false;
		try {
			result = address.isReachable(1000);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return result;
	}

	public void setAddress(InetAddress address) {
		this.address = address;
	}

}
